﻿<%@ Page Language="C#" 
    MasterPageFile="~/Main.Master" 
    AutoEventWireup="true" 
    CodeBehind="Resumes.aspx.cs"
    Inherits="ETestIT.UI.Resumes" %>

<%@ Register TagPrefix="uc" TagName="ResumeAddUpdate" Src="~\AppControls\ResumeAddUpdate.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2 id="PageTitle"><%= Title %></h2>
    <asp:LinkButton ID="addNewCandidate" Text="add new" runat="server" OnClick="BtnAddNewResume_Clicked" CssClass="linkButton ui-state-default ui-corner-all"/>
    <br/><br/>
    <div>
        <asp:GridView ID="gvReumes" runat="server" AutoGenerateColumns="False" CssClass="easygrid">
            <Columns>
                <asp:TemplateField HeaderText="Profile title">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbtnView" runat="server" Text='<%#Eval("TheJobTitle.Name")%>' CommandName="ViewCandidateResume"
                            CommandArgument='<%#Eval("TheResume.Id")%>' OnCommand="LnkResumesViewCommand">
                        </asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="File Name">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbtnEditUser" runat="server" Text='<%#Eval("TheResume.Name")%>' CommandName="ViewCandidateResume"
                            CommandArgument='<%#Eval("TheResume.Id")%>' OnCommand="LnkResumesViewCommand">
                        </asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Version">
                    <ItemTemplate>
                        <asp:Label runat="server" Text='<%#Eval("TheResume.Version")%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText = "Action">
                    <ItemTemplate>
                        <asp:LinkButton 
                                ID="lbtnHistoryOfResume" 
                                runat="server" 
                                Text="History"
                                CommandName="ViewCandidateResumesHistory" 
                                CommandArgument='<%#Eval("Id")%>' 
                                OnCommand="LnkResumesViewCommand"
                                CssClass="linkButton ui-state-default ui-corner-all"/>
                        <asp:LinkButton 
                                ID="lbtnUpdateResume" 
                                runat="server" 
                                Text="Update"
                                CommandName="UpdateCandidateResume" 
                                CommandArgument='<%#Eval("TheResume.Id")%>' 
                                OnCommand="LnkResumesViewCommand"
                                CssClass="linkButton ui-state-default ui-corner-all"/>
                       <asp:LinkButton 
                                ID="lbtnDeleteResume" 
                                runat="server" 
                                Text="Remove"
                                CommandName="RemoveCandidateResume" 
                                CommandArgument='<%#Eval("Id")%>' 
                                OnCommand="LnkResumesViewCommand" 
                                OnClientClick='YesNoDialog(this); return false;'
                                CssClass="linkButton ui-state-default ui-corner-all"/>
                    </ItemTemplate>
               </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
        <br />
    <div>
        <uc:ResumeAddUpdate runat="server" Id="resumeAddUpdate" Visible="false" />
    </div>
</asp:Content>